// import React from 'react'
import React, { useState, useEffect } from "react";
import { policydetail } from "./sevice/postQuery";
import { NavBar } from 'react-vant';
import { Cell } from 'react-vant';
export default function Detailpolicy() {
    let [list, setList] = useState()
    // let a=dangerouslySetInnerHTML={__html:list.content}
  useEffect(() => {
    (async () => {
      let { data } = await policydetail(window.localStorage.getItem("pocy"));
        console.log(data);
        setList(data.data)
      })();
  }, []);
    
    useEffect(() => {
        console.log(list,"啦啦啦");
    },[list])
    return <div>
        <NavBar
      title={list?.author}
      leftText="返回"
    //   rightText="按钮"
      onClickLeft={() => window.history.back()}
    //   onClickRight={() => Toast('按钮')}
    />
        <Cell.Group>
            <Cell title={list?.title} label={
<div dangerouslySetInnerHTML={{__html:list?.content}} ></div>} />
            
    </Cell.Group>
  </div>;
}
